package com.atwork.wuhua.base;


import com.atwork.wuhua.utils.HttpUtil.Rsa;

public class BaseReq {
    private String secret;
    private StringBuffer sb = new StringBuffer();
    private int anInt = 0;

    public void setKey(String key, String value) {
        if (anInt == 0) {
            sb.append(key + "=" + value);

        } else {
            sb.append("&" + key + "=" + value);
        }
        anInt++;
    }
    public String getString() {
        return sb.toString();
    }
    public String getSecret() {
        Rsa rsa = new Rsa();
        secret = rsa.encryptByPublic(sb.toString());
        return secret;
    }
}
